import type {
  ApiType,
  articleOperateEditData,
  articleOperateInit,
} from 'src/service/api';
import { ref } from 'vue';

/* 博客数据 */
export const formBody = ref({
  id: '',
  title: '',
  content: '',
  htmlContent: '',
  summary: '',
  categoryId: '',
  tagList: [],
  topic: undefined as unknown as Api.SelectVO,
  articleCover: '',
  status: 0,
});

type pageInitType = ApiType<typeof articleOperateInit>['Return'];

export const pageInit = ref<pageInitType>({
  categoryList: [],
  tagList: [],
  topicList: [],
});

type artDataType = ApiType<typeof articleOperateEditData>['Return'];

export const artData = ref<artDataType>();
